package kayao.client.network.message;

import kayao.common.KayaoValues;
import kayao.common.NetworkUtils;

public class DeadClientMessage extends Message {

	private int mDeadId;
	public DeadClientMessage(int iddead) 
	{
		super(KayaoValues.SERVER_IP,3,5000,Message.PRIORITY_HIGH);
		mDeadId=iddead;
		createPacketData();
		
	}

	@Override
	public void createPacketData() {
		System.out.println("Dead Id: "+mDeadId);
		//size=4+1+4
		mSendData=new byte[9];
		int index=0;
		NetworkUtils.insertIntToByteArray(mSendData, index, KayaoValues.MAGIC_NUMBER);
		index+=4;
		mSendData[index]=KayaoValues.DEAD_CLIENT;
		index++;
		NetworkUtils.insertIntToByteArray(mSendData, index, mDeadId);
	}

	@Override
	public String type() {
		// TODO Auto-generated method stub
		return "DeadClient";
	}

}
